# -*- coding: utf-8 -*-
# =============================================================================
#     FileName:
#         Desc:
#       Author:
#        Email:
#     HomePage:
#      Version:
#   LastChange:
#      History:
# =============================================================================
from enum import Enum


class TaskStatus(Enum):
    PENDING = 0
    RUNNING = 1
    SUCCESS = 2
    FAILED = 3

    @classmethod
    def get_members(cls):
        return list((item.name, item.value) for _, item in cls.__members__.items())


def task_status_test():
    task_status = TaskStatus(3)
    print(task_status.name)


if __name__ == '__main__':
    task_status_test()
